﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace CalculateResistance
{
    [XmlType("线")]
    public class Line
    {
        [XmlAttribute]
        public string Id { get; set; }

        /// <summary>
        /// 电阻
        /// </summary>
        [XmlAttribute("电阻")]
        public double Resistance { get; set; }

        /// <summary>
        /// 线的起点
        /// </summary>
        [XmlAttribute]
        public string StartPoint { get; set; }
        /// <summary>
        /// 线的终点
        /// </summary>
        [XmlAttribute]
        public string EndPoint { get; set; }


        public override bool Equals(object obj)
        {
            Line l = obj as Line;
            if (l == null) return false;
            return l.Id == this.Id;
        }

    }
}
